{layout name="layout/default" /}
<div class="panel panel-default panel-intro">
  <div class="panel-heading">
    <div class="panel-lead"><em>{$nav_title.title}</em>{$nav_title.remark}</div>
          <ul class="nav nav-tabs">
          <li class="active"><a class="ajax-url" href="#0" url="{:admin_url('admin/config/show')}" data-toggle="tab">全部</a></li>
          {volist name="group_list" id="item"}
            <li{eq name="key" value="$group_id"} class="active"{/eq}><a class="ajax-url" href="#{$key}" url="{:admin_url('admin/config/show',array('group'=>$key))}" data-toggle="tab">{$item}</a></li>
          {/volist}  
        </ul>    
  </div>
  <div class="panel-body" id="contents">
    <div id="myTabContent" class="tab-content">
      <div class="tab-pane fade active in">
        <div class="widget-body no-padding">
          <div class="bootstrap-table">
            <div class="fixed-table-toolbar">
              <div class="columns-right pull-right" style="margin-top:10px;">
                <form class="form-inline form-commonsearch nice-validator n-default" method="post" action="">
                  <input class="form-control" placeholder="搜索" type="text" name="wd">
                  <button type="submit" class="btn btn-default ajax-posturl"  title="普通搜索"  target-form="form-commonsearch"><i class="glyphicon glyphicon-search"></i></button>
                </form>
              </div>
              <div class="pull-right search">
                <select name="status" class="form-control" type="get-select" style="margin:0 0 0 10px;">
                  <option value="{:admin_url('admin/config/show')}">全部</option>
                  <option value="{:admin_url('admin/config/show',array('wd'=>$wd,'group'=>$group,'status'=>1,'type'=>$type,'order'=>$order))}" {eq name="status" value="1"}selected{/eq}>
                  显示
                  </option>
                  <option value="{:admin_url('admin/config/show',array('wd'=>$wd,'group'=>$group,'status'=>2,'type'=>$type,'order'=>$order))}" {eq name="status" value="2"}selected{/eq}>
                  隐藏
                  </option>
                </select>
              </div>
              <div class="bs-bars pull-left">
                <div id="toolbar" class="toolbar"><a href="{:admin_url('admin/config/show',array('group'=>$group))}" class="btn btn-primary ajax-url"><i class="fa fa-refresh"></i> </a> <a href="javascript:;" data-url="{:admin_url('admin/config/add')}" data-name="添加配置" class="btn btn-success btn-add btn-editone"><i class="fa fa-plus"></i> 添加</a> <a  url="{:admin_url('admin/config/status',array('status'=>1))}" target-form="ids" class="confirm btn btn-info btn-disabled btn-disabled ajax-post disabled"><i class="fa fa-unlock"></i> 启用</a> <a  url="{:admin_url('admin/config/status',array('status'=>0))}" target-form="ids" class="confirm btn btn-warning btn-disabled btn-disabled ajax-post disabled"><i class="fa fa-lock"></i> 禁用</a> <a  url="{:admin_url('admin/config/del')}" target-form="ids" class="confirm btn btn-danger btn-del btn-disabled ajax-post disabled"><i class="fa fa-trash"></i> 删除</a> <span id="selectedChks" style="display:none">已选择<strong></strong>记录</span> </div>
              </div>
            </div>
          </div>
          <div class="fixed-table-container" style="padding-bottom: 0px;">
            <div class="fixed-table-body">
              <form class="ids">
                <table id="table" class="table table-striped table-bordered table-hover" style="margin-top: 0px;" width="100%">
                   <thead>
                    <tr style="height:45px;">
                      <th align="center" class="bs-checkbox"> <input name="chkall" type="checkbox" id="chkall"></th>
                      <th style="text-align:center;vertical-align: middle;">{eq name="orders" value="id desc"}<a href="{:admin_url('admin/config/show',array('wd'=>$wd,'group'=>$group,'status'=>$status,'type'=>'id','order'=>'asc'))}" class="btn-link sort ajax-url">编号 <i class="fa fa-angle-up"></i></a>{else/}<a href="{:admin_url('admin/config/show',array('wd'=>$wd,'group'=>$group,'status'=>$status,'type'=>'id','order'=>'desc'))}" class="btn-link sort ajax-url">编号 <i class="fa fa-angle-down"></i></a>{/eq}</th>
                      <th style="text-align:center;vertical-align: middle;">名称</th>
                      <th style="text-align:center;vertical-align: middle;">标题</th>
                      <th style="text-align:center;vertical-align: middle;">分组</th>
                      <th style="text-align:center;vertical-align: middle;">类型</th>
                      <th style="text-align:center;vertical-align: middle;">{eq name="orders" value="sort desc"}<a href="{:admin_url('admin/config/show',array('wd'=>$wd,'group'=>$group,'status'=>$status,'type'=>'sort','order'=>'asc'))}" class="btn-link sort ajax-url">排序 <i class="fa fa-angle-up"></i></a>{else/}<a href="{:admin_url('admin/config/show',array('wd'=>$wd,'group'=>$group,'status'=>$status,'type'=>'sort','order'=>'desc'))}" class="btn-link sort ajax-url">排序 <i class="fa fa-angle-down"></i></a>{/eq}</th>
                      <th style="text-align:center;vertical-align: middle;">状态</th>
                      <th style="text-align:center;vertical-align: middle;">操作</th>
                    </tr>
                  </thead>                
                 <tbody>
              {notempty name="list"}
               {volist name="list" id="vo"}
                <tr>
                <td class="bs-checkbox" style="text-align:center;vertical-align: middle;"><input name="id[]" type="checkbox" value="{$vo['id']}" id="checkbox"></td>
                <td align="center">{$vo.id}</td>
                <td align="center"><a href="javascript:;" class="btn-link editable editable-click" data-id="{$vo['id']}" data-name="name" data-type="text" data-pk="{$vo['id']}" data-url="{:admin_url('admin/config/editable')}">{$vo.name}</a></td>
                
                <td align="center"><a href="javascript:;" class="btn-link editable editable-click" data-id="{$vo['id']}" data-name="title" data-type="text" data-pk="{$vo['id']}" data-url="{:admin_url('admin/config/editable')}">{$vo.title}</a></td>
                <td align="center">{$group_list[$vo['group']]|default=''}</td>
                <td align="center">{$type_list[$vo['type']]|default=''}</td>
                <td align="center"><a href="javascript:;" class="btn-link editable editable-click" data-id="{$vo['id']}" data-name="sort" data-type="text" data-pk="{$vo['id']}" data-url="{:admin_url('admin/config/editable')}">{$vo.sort}</a></td>
                <td align="center">
                {eq name="vo.status" value="1"} <a class="btn btn-info btn-xs btn-success ajax-get" url="{:admin_url('admin/config/status',array('id'=> $vo['id'],'status'=>0))}">启用</a>{else /}<a class="btn btn-info btn-xs btn-danger ajax-get" url="{:admin_url('admin/config/status',array('id'=> $vo['id'],'status'=>1))}">禁用</a>{/eq}
                 </td>
                <td align="center">
                <a href="javascript:;" data-url="{:admin_url('admin/config/edit',array('id'=>$vo['id']))}"  data-name="编辑" class="btn btn-success btn-editone btn-xs"><i class="fa fa-pencil"></i> 编辑</a> <a url="{:admin_url('admin/config/del',array('id'=>$vo['id']))}" class="confirm btn btn-danger btn-xs confirm ajax-get"><i class="fa fa-trash-o"></i> 删除</a>   
                  </td>
              </tr>
    {/volist}   
                  {else/}
                  <tr>
                    <td style="text-align:center;vertical-align: middle;" colspan="9" >抱歉，没有找到相关内容！</td>
                  </tr>
                  {/notempty}
                  </tbody>
                </table>
              </form>
            </div>
            {gt name="list->lastPage()" value="1"}
            <div class="fixed-table-pagination" style="overflow:hidden">
              <div class="pull-left pagination-detail"><span class="pagination-info">共{$list->total()}条 {$list->currentPage()}/{$list->lastPage()} </span><span class="page-list">每页显示 {$list->listRows()} 条</span></div>
              <div class="pull-right pagination">
                <ul class="pagination">{$page}</ul>
              </div>
            </div>
          {/gt}  
          </div>
        </div>
        <div class="clearfix"></div>
      </div>
    </div>
  </div>
</div>
</div>
